  {%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->

  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
  
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">期末学生评语</p>
                </div>
                   <div class="box-body">
                        <table class="table table-bordered" id="mytable">
                                <thead>
                                    <tr>
                                        <td>座号</td>
                                        <td>姓名</td>
                                        <td>评语内容</td>
                                        <td width="130">操作</td>
                                    </tr>
                                </thead>
                                <tbody>
                                 {%foreach from=$stu_lists key=key item=value%}
                                    <tr>
                                        <td>{%$value.student_seat%}</td>
                                        <td>{%$value.student_name%}</td>
                                        <td>{%$value.message_con%}</td>
                                        <td>
                                             <button name="{%$value.message_id%}" class="btn btn-success btn-xs message" data-toggle="modal" data-target="#myModal">编 辑</button>
                                             <a href="index.php?a=message.evalinfo&student_id={%$value.student_id%}" class="btn btn-warning btn-xs">查 看</a>
                                        </td>
                                    </tr>   
                                       {%/foreach%}  
                             </tbody>

                        </table>                     
                   </div><!--box-body -->
 
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
  <!--弹出框-->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
          <form action="index.php?a=message.upeval" method="post">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">期末学生评语</h4>
              </div>
              <div class="modal-body">
                    <span>学号：<input type="text" name="student_id"  ></span>  <span style="margin-left:30px;">姓名： <input type="text" name=""></span>
           
                    <div class="form-group" style="margin-top:16px;" id="int">
                        <p>评语内容</p>
                        <textarea class="form-control" rows="3" name="message_con"></textarea>
                    </div>
              </div>
              <div class="modal-footer center-block">
                <button type="submit" class="btn btn-primary">确 定</button>
              </div>
          </form>
    </div>
  </div>
</div>
 
<!-- ./wrapper -->
 {%include file="index.footer.tpl.php"%}
 <script type="text/javascript">
   $(".message").click(function(){
       var id = $(this).attr('name');
    var hidden ="<input type=\"text\" name=\"message_id\" hidden=\"hidden\" value=\""+id+"\">";
    $("#int").append(hidden);
   })
 </script>
